﻿@model Sprint1.Models.Question
@Session["QuestionId"]= model.Id;
<div style="font-family:Arial">
<script src="~/Scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
  
      @Html.LabelFor(model => model.Student.Name)
      @Html.LabelFor(model => model.Date)

    <div>
        @Html.DisplayFor(model => model.Title)
        
        @Html.DisplayFor(model => model.Body) 
    </div>

    @Ajax.ActionLink("All Answers", "SeeAllAnswers", "CourseController",
    new AjaxOptions() { 
        HttpMethod= "GET",
        UpdateTargetId = "divanswers",
        InsertionMode = InsertionMode.InsertBefore
       
    })
    <span style="color:Blue">|</span>
    @Ajax.ActionLink("Top 3 ", "First3Answers", "CourseController",
    new AjaxOptions()
    {
        HttpMethod = "GET",
        UpdateTargetId = "divanswers",
        InsertionMode = InsertionMode.Replace

    })
    <span style="color:Blue">|</span>
    @Ajax.ActionLink("Post Answer", "PostAnswer", "CourseController",
    new AjaxOptions()
    {
        HttpMethod = "GET",
        UpdateTargetId = "divanswers",
        InsertionMode = InsertionMode.Replace
    })
    </div>
    <div id=" divanswers">
        @Html.Partial("~/Views/Course/_PostAnswer.cshtml")
   </div>
